package model

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ AwRolePermissionsModel = (*customAwRolePermissionsModel)(nil)

type (
	// AwRolePermissionsModel is an interface to be customized, add more methods here,
	// and implement the added methods in customAwRolePermissionsModel.
	AwRolePermissionsModel interface {
		awRolePermissionsModel
		withSession(session sqlx.Session) AwRolePermissionsModel
	}

	customAwRolePermissionsModel struct {
		*defaultAwRolePermissionsModel
	}
)

// NewAwRolePermissionsModel returns a model for the database table.
func NewAwRolePermissionsModel(conn sqlx.SqlConn) AwRolePermissionsModel {
	return &customAwRolePermissionsModel{
		defaultAwRolePermissionsModel: newAwRolePermissionsModel(conn),
	}
}

func (m *customAwRolePermissionsModel) withSession(session sqlx.Session) AwRolePermissionsModel {
	return NewAwRolePermissionsModel(sqlx.NewSqlConnFromSession(session))
}
